package com.sz.classload;

public class ClinitTest {
    public static void main(String[] args) {
        Runnable script = ()->{
            System.out.println(Thread.currentThread() + "start");
            DeadLoopClass deadLoopClass = new DeadLoopClass();
            System.out.println(Thread.currentThread() + "end");
        };

        Thread thread1 = new Thread(script);
        Thread thread2 = new Thread(script);
        thread1.start();
        thread2.start();


    }


    static class DeadLoopClass{
        static {
            System.out.println("DeadLoopClass.static initializer "+Thread.currentThread());
            if (true){
                while (true){

                }
            }
        }
    }
}
